package com.zw.mqtt.Netty;

import com.corundumstudio.socketio.AckRequest;
import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.SocketIOServer;
import com.corundumstudio.socketio.annotation.OnConnect;
import com.corundumstudio.socketio.annotation.OnDisconnect;
import com.corundumstudio.socketio.annotation.OnEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 创建人:zhuwei
 * 邮箱:121203654@qq.com
 * 创建时间:2018-04-23 16:39
 */
@Component
public class MessageEventHandler {
    private final SocketIOServer server;

    @Autowired
    public MessageEventHandler(SocketIOServer server)
    {
        this.server = server;
    }

    /**
     * 客户端连接事件
     * @param client
     */
    @OnConnect
    public void onConnect(SocketIOClient client)
    {

    }

    @OnDisconnect
    public void onDisconnect(SocketIOClient client){

    }

    @OnEvent(value = "messageevent")
    public void onEvent(SocketIOClient client, AckRequest request){

    }
}
